package com.neusoft.serviceImp;

import com.neusoft.mapper.SysDeptMapper;
import com.neusoft.pojo.SysDept;
import com.neusoft.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
//子类实现了父接口，注解加在子类上
public class SysDeptServiceImp implements ISysDeptService {

    @Autowired(required = false)
    SysDeptMapper sysDeptMapper;

    @Override
    public boolean sysDeptInsert(SysDept sysDept) {
        int n=sysDeptMapper.sysDeptInsert(sysDept);
        if(n>0)
        {
            return true;
        }
        return false;
    }

    @Override
    public List<SysDept> sysDeptList(SysDept sysDept) {
        return sysDeptMapper.SysDeptList(sysDept);
    }
}
